﻿using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.DTO;
using mendian;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.款式类别
{
    public partial class Frm款式类别新建 : DevExpress.XtraEditors.XtraForm
    {
        public Frm款式类别新建()
        {
            InitializeComponent();
        }

        private void simpleButton保存_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(this.textBoxCode.Text) || String.IsNullOrWhiteSpace(this.textBoxName.Text))
            {
                MessageBox.Show("请填写完整");
                return;
            }
            RestCall.PostHttp(URL.接口url+"/style/saveStyleCategory", FunctionHelper.JsonSerialization(new StyleCategoryDTO(new FunctionHelper().Uuid, "STYLE_CATEGORY-" + this.textBoxCode.Text, this.textBoxName.Text)));
            this.Close();
        }

        private void simpleButton取消_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
